<!--
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<div class="admin__action-dropdown-wrap admin__data-grid-action-bookmarks" collapsible>
    <button class="admin__action-dropdown" type="button" toggleCollapsible>
        <span class="admin__action-dropdown-text" text="activeView.label"/>
    </button>
    <ul class="admin__action-dropdown-menu">
        <repeat args="foreach: viewsArray, item: '$view'">
            <li css="_edit: isEditing($view().index)" outerClick="endEdit.bind($data, $view().index)" template="viewTmpl"/>
        </repeat>
        <li visible="hasChanges" outerClick="hideCustom.bind($data)"
            css="
                _edit: customVisible,
                'action-dropdown-menu-action action-dropdown-menu-item-last': !customVisible">
            <a href="" visible="!customVisible" click="showCustom" translate="'Save View As...'"/>
            <div class="action-dropdown-menu-item-edit" visible="customVisible">
                <input class="admin__control-text" type="text"
                    data-bind="
                        value: customLabel,
                        autoselect,
                        hasFocus: isCustomVisible(),
                        keyboard: {
                            13: applyCustom.bind($data),
                            27: hideCustom.bind($data)
                        }">
                <div class="action-dropdown-menu-item-actions">
                   <button class="action-submit" type="button" click="applyCustom" attr="title: $t('Save all changes')">
                        <span translate="'Submit'"/>
                    </button>
                </div>
            </div>
        </li>
    </ul>
</div>
